package com.demo.service;

import com.demo.common.Result;
import com.demo.dao.FileDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FileService {
    @Autowired
    FileDao dao;

    public void addFile(Map param) {
        dao.addFile(param);
    }

    public Result getFileListByParam(String id, String table) {
        List<Map> fileList=dao.getFileListByParam(id,table);
        return Result.ok().Data(fileList);
    }

    public void deleteFileById(String id) {
        dao.deleteFileById(id);
    }

    public Map getFileById(String id) {
        return dao.getFileById(id);
    }
}
